3.9.16 \(\int \frac {\sqrt {a+b x}}{\sqrt {-a-b x}} \, dx\) [816]

Optimal. Leaf size=23 \[ \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \]

[Out]

x*(b*x+a)^(1/2)/(-b*x-a)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {23, 8} \begin {gather*} \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b*x]/Sqrt[-a - b*x],x]

[Out]

(x*Sqrt[a + b*x])/Sqrt[-a - b*x]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rubi steps

\begin {align*} \int \frac {\sqrt {a+b x}}{\sqrt {-a-b x}} \, dx &=\frac {\sqrt {a+b x} \int 1 \, dx}{\sqrt {-a-b x}}\\ &=\frac {x \sqrt {a+b x}}{\sqrt {-a-b x}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 23, normalized size = 1.00 \begin {gather*} \frac {x \sqrt {a+b x}}{\sqrt {-a-b x}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b*x]/Sqrt[-a - b*x],x]

[Out]

(x*Sqrt[a + b*x])/Sqrt[-a - b*x]

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 23, normalized size = 1.00

method result size
default \(-\frac {\sqrt {b x +a}\, \sqrt {-b x -a}}{b}\) \(23\)
risch \(-\frac {i \sqrt {\frac {-b x -a}{b x +a}}\, \sqrt {b x +a}\, x}{\sqrt {-b x -a}}\) \(40\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^(1/2)/(-b*x-a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-(b*x+a)^(1/2)*(-b*x-a)^(1/2)/b

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^(1/2)/(-b*x-a)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^(1/2)/(-b*x-a)^(1/2),x, algorithm="fricas")

[Out]

0

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 0.83, size = 53, normalized size = 2.30 \begin {gather*} \begin {cases} 0 & \text {for}\: \frac {1}{\left |{\frac {a}{b} + x}\right |} < 1 \wedge \left |{\frac {a}{b} + x}\right | < 1 \\- i \left (\frac {a}{b} + x\right ) & \text {for}\: \frac {1}{\left |{\frac {a}{b} + x}\right |} < 1 \vee \left |{\frac {a}{b} + x}\right | < 1 \\- i {G_{2, 2}^{1, 1}\left (\begin {matrix} 1 & 2 \\1 & 0 \end {matrix} \middle | {\frac {a}{b} + x} \right )} - i {G_{2, 2}^{0, 2}\left (\begin {matrix} 2, 1 & \\ & 1, 0 \end {matrix} \middle | {\frac {a}{b} + x} \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**(1/2)/(-b*x-a)**(1/2),x)

[Out]

Piecewise((0, (Abs(a/b + x) < 1) & (1/Abs(a/b + x) < 1)), (-I*(a/b + x), (Abs(a/b + x) < 1) | (1/Abs(a/b + x)
< 1)), (-I*meijerg(((1,), (2,)), ((1,), (0,)), a/b + x) - I*meijerg(((2, 1), ()), ((), (1, 0)), a/b + x), True
))

________________________________________________________________________________________

Giac [C] Result contains complex when optimal does not.
time = 2.57, size = 12, normalized size = 0.52 \begin {gather*} \frac {-i \, b x - i \, a}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^(1/2)/(-b*x-a)^(1/2),x, algorithm="giac")

[Out]

(-I*b*x - I*a)/b

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \frac {\sqrt {a+b\,x}}{\sqrt {-a-b\,x}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x)^(1/2)/(- a - b*x)^(1/2),x)

[Out]

int((a + b*x)^(1/2)/(- a - b*x)^(1/2), x)

________________________________________________________________________________________